﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;

namespace CPPEI.PM.Service.Model.Repository
{
    public class WorkStageItemRepository
    {
        private DbContext _dbContext;
        public WorkStageItemRepository(DbContext dbContext)
        {
            _dbContext = dbContext;
        }

        public WorkStageItem Get(Guid id)
        {
            return _dbContext.Set<WorkStageItem>().SingleOrDefault(p => p.Id == id);
        }

        public void Create(WorkStageItem workStageItem)
        {
            _dbContext.Set<WorkStageItem>().Add(workStageItem);
        }
    }
}
